package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.Post;
import com.yami.shop.bean.param.CreatePostParam;
import com.yami.shop.bean.param.PostsQuery;
import com.yami.shop.bean.vo.PostsVO;

/**
 * <p>
 * 用于存储用户发布的动态，包括文字、图片和视频 服务类
 * </p>
 * @author EXiaoKe
 * @since 2025-04-14
 */
public interface PostService extends IService<Post> {
    /**
     * 分页查询动态
     * @param page
     * @param query
     * @return
     */
    IPage<PostsVO> getPostPage(Page<Post> page, PostsQuery query);
    /**
     *
     * @param postId
     * @param auditAction
     * @param reason
     */
    void auditPost(Long postId, String auditAction, String reason);

    /**
     * 创建新帖子
     * @param param
     * @return
     */
    Long createPost(CreatePostParam param);

    /**
     * 删除帖子
     * @param postId
     * @param userId
     */
    void deletePost(Long postId, String userId);
}





